home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / hardware / netvid.arc / RETURN.DOC < prev    next >
Text File  |  1989-10-15  |  2KB  |  47 lines

  1.  
  2.                                RETURN.EXE
  3.                                   v1.0
  4.  
  5.                              Brad Stephenson
  6.                               670 Edgeworth
  7.                             Jenison, MI  49428
  8.                          Compuserve ID 71620,1035
  9.  
  10.        I've often seen other users attempting to set up a batch file 
  11.        that would branch on a certain DOS Errorlevel return code from 
  12.        an executed program.  In some cases, a fair amount of trial 
  13.        and error is needed because the exact program return is not 
  14.        known (and is not normally visible). 
  15.        
  16.        RETURN can help eliminate the trial and error.  It allows you 
  17.        to call up a program (passing it up to three command line 
  18.        parameters) and see the DOS Errorlevel returned at the end of 
  19.        program execution. 
  20.  
  21.        RETURN is most helpful when you would like a batch file to 
  22.        present meaningful error messages when program errors occur. 
  23.        Using RETURN, you call up the desired program, cause the 
  24.        error, then note the DOS return code (see example).  Now that 
  25.        you know the exact return code, you can set up batch file 
  26.        branch conditions to handle that specific error and display a 
  27.        detailed error message. 
  28.  
  29.  
  30.        SYNTAX: 
  31.        
  32.            RETURN <program> [parm1] [parm2] [parm3] [parm4]
  33.  
  34.               parm1, parm2, parm3, and parm4 are optional command
  35.               line parameters for the called program.
  36.  
  37.  
  38.        EXAMPLE:
  39.                                   
  40.  
  41.               C>return fv badname
  42.  
  43.                 no file(s) found.
  44.  
  45.                 Errorlevel return from FV is: 2
  46.  
  47.